This page last changed on Aug 19, 2009 by stepheneb.

The web application: cia.vc can be used to both monitor a project's subversion repository and deliver messages about commits to an IRC channel.

You can add your own projects from github by going to the admin tab in the github repo, and turning on CIA commit hooks (second sub-tab "service hooks" in the admin menu). There are no options for the CIA commit bot. You configure the bot from cia.vc

The Concord CIA bot is a community bot, so anyone can change its settings. Follow these steps to add a new project to be tracked by CIA:

  • Create a new account for yourself at cia.vc.
  • Click on the "Bots" tab in the left hand side.
  • "Add" a new bot. Enter "Freenode" as the IRC Network, and "#Otrunk" as the channel.
  • "adding" this bot, actually just finds the bot which exists already as bot 9370 .
  • You will have to configure a pattern-match for your project under the advanced-filtering settings tab. (see the XML below).
  • There is a web-page which describes the bot-markup.

Currently the otrunk channel bot is configured for:

project cia.vc project repository
OTrunk http://cia.vc/account/projects/9369/ http://svn.concord.org/svn/projects
DIY http://cia.vc/account/projects/9953/ http://svn.concord.org/svn/diy
SAIL Data Service http://cia.vc/account/projects/9951/ http://svn.concord.org/svn/sds
RITES Investigations http://cia.vc/account/projects/13401 http://github.com/stepheneb/rigse
MySystem http://cia.vc/account/projects/14095 http://github.com/knowuh/mysystem

SVN Post-commit Hooks

There is a post-commit hook for each of those subversion repositories that generates a message to cia.vc describing the commit.

Integration with GitHub

Integration with the repositories hosted on GitHub can be enabled by turning CIA integration on in the Service Hooks section. This can only be done by the owner of the project.

In addition I created an OTrunk on Freenode bot at cia.vc that listens to each one of those projects and generates messages sent to the otrunk IRC channel describing commits.

The OTrunk on Freenode bot uses an advanced filter using CIA's ruleset language so that a link to the trac changeset is included in the message sent to the irc channel.

A message sent to the irc from the CIA bot might look like this:

CIA-63: ==> otrunk :: aunger * r16611 /trunk/common/java/otrunk/otrunk-examples/Overlays/overlay-wrapper-activity.otml http://trac.cosmos.concord.org/projects/changeset/16611
CIA-63 A test activity for the on-the-fly saving of changes to an overlay.

That log message sent to IRC indicates:

  1. the commit was to the main CC project repo (which is called otrunk here)
  2. the commit was by the user aunger
  3. it was svn rev 16611
  4. only one file was updated: overlay-wrapper-activity.otml
  5. a link to the Trac visualization of the changeset is provided
  6. the log message that describes the commit

Here's what the advanced filter for the #otrunk bot looks like:

<or>
  <match path="project"> otrunk </match>
  <match path="project"> sds </match>
  <match path="project"> diy </match>
  <match path="project"> rigse </match>
  <match path="project"> rites_portal </match>
  <match path="project"> mysystem </match>
  <match path="project"> mysystem-sinarta </match>
</or>

<rule>
  <not>
    <or>
      <match path="project"> otrunk </match>
      <match path="project"> rigse </match>
    </or>
  </not>
  <formatter medium="irc">
    <format appliesTo="CommitToIRC">
      <autoHide><b><color fg='blue'>==> <project/> :: </color></b></autoHide>
      <autoHide><color fg='green'><author/></color></autoHide>
      <autoHide><color fg='orange'><branch/></color></autoHide>
      *
      <autoHide><b><version/></b></autoHide>
      <autoHide>r<b><revision/></b></autoHide>
      <color fg='aqua'><module/></color>/<files/>
      <autoHide><br />http://trac.cosmos.concord.org/<project/>/changeset/<revision/></autoHide>
      <autoHide><br /><log/></autoHide>
      <br />
    </format>
  </formatter>
</rule>  

<rule>
  <match path="project"> otrunk </match>
  <formatter medium="irc">
    <format appliesTo="CommitToIRC">
      <autoHide><b><color fg='blue'>==> <project/> :: </color></b></autoHide>
      <autoHide><color fg='green'><author/></color></autoHide>
      <autoHide><color fg='orange'><branch/></color></autoHide>
      *
      <autoHide><b><version/></b></autoHide>
      <autoHide>r<b><revision/></b></autoHide>
      <color fg='aqua'><module/></color>/<files/>
      <autoHide><br />http://trac.cosmos.concord.org/projects/changeset/<revision/></autoHide>
      <autoHide><br /><log/></autoHide>
      <br />
    </format>
  </formatter> 
</rule>

<rule>
  <or>
    <match path="project"> rigse </match>
    <match path="project"> rites_portal </match>
  </or>
  <formatter medium="irc">
    <format appliesTo="CommitToIRC">
      <autoHide><b><color fg='blue'>==> <project/> :: </color></b></autoHide>
      <autoHide><color fg='green'><author/></color></autoHide>
      <autoHide><color fg='orange'><branch/></color></autoHide>
      *
      <autoHide><b><version/></b></autoHide>
      <autoHide>r<b><revision/></b></autoHide>
      <color fg='aqua'><module/></color>/<files/>
      <autoHide><br /><log/></autoHide>
      <br />
    </format>
  </formatter> 
</rule>

The matcher for the otrunk project needed to be special-cased because the trac project name is projects instead of otrunk.

Document generated by Confluence on Jan 27, 2014 16:52